The invention relates generally to the field of digital image processing and, more particularly, to modifying the perspective of a digital image.
Perspective distortion is well known in photography. Traditionally, a view camera permits the photographer to avoid perspective distortion. This is accomplished by having independent control over the position of both the lens plane and the image plane. Lines in the scene that are parallel to both the lens and image planes will appear parallel on the image. A view camera permits the photographer to control the character of the distortion that occurs by projecting a three-dimensional scene onto a two-dimensional image plane.
Image warping is a well-known tool that may be used to modify the apparent perspective of an image. For example, U.S. Pat. No. 5,651,075 by Frazier et al., describes a method of compensating for the perspective distortion present in an image of a license plate captured at a known camera to subject distance. This patent describes a method of modifying the perspective by using the known relationship between the camera and the subject, which relationship is always constant.
Although the presently known and utilized method of modifying distortion is satisfactory, it is not without drawbacks. The prior art method assumes a predetermined level of perspective distortion is always present.
Consequently, a need exists for overcoming the above-described drawbacks. Most importantly, a need exists for a method which detects both the presence and level of the perspective distortion present in the image rather than assuming a certain level of perspective distortion.
The present invention is directed to overcoming one or more of the problems set forth above. Briefly summarized, according to one aspect of the present invention, the invention resides in a method for modifying an apparent perspective of a digital image representing a perspective projection of a scene, the method comprising the steps of: (a) locating a line in the digital image; (b) computing a correction term based on parameters of the located line which said correction term is related to the perspective of the digital image relative to the scene; and (c) resampling the digital image based on the correction term for creating a processed image.
The above and other objects of the present invention will become more apparent when taken in conjunction with the following description and drawings wherein identical reference numerals have been used, where possible, to designate identical elements that are common to the figures.